<h2 class="h2-title">Danh sách slide ảnh !!!</h2>

<p><a href="<?=base_url()?>backend/slide/createslide" class="bnt"style="margin-bottom: 15px;">Tạo slide</a></p>

<div class="clear"></div>
<?php if($this->native_session->flashdata('msg')):?>
    <ul class="notification succ">
        <li class="notifi_img"><img src="<?=base_url()?>assets/backend/css/images/icons/tick_circle.png"/></li>

        <li class="msg"><?=$this->native_session->flashdata('msg')?></li>

        <li class="close"><img src="<?=base_url()?>assets/backend/css/images/icons/cross_grey_small.png"/></li>

    </ul><!--End of .notification -->
<?php endif?>

<table class="pretty">
                    <thead>
                        <tr>
                            <th>ID</th>
                            <th>Hình ảnh</th>
                            <th>Mô tả</th>
                            <th>Ngày tạo</th>
                            <th>Liên kết</th>
                            <th>Trạng thái</th>
                            <th>Thứ tự</th>
                            <th>Sửa</th>
                            <th>Xoá</th>
                        </tr>
                    </thead>

                    <tbody>

                        <?php if(isset($msg)):?>
                            <td colspan="9"><?= $msg ?></td>
                        <?php else:?>
                            <?php if(!empty($slides)):?>
                                <?php foreach($slides as $slide):?>
                                    <tr>
                                    <td><?=$slide->slide_id?></td>
                                    <td><img style="border: 1px solid #ddd;" width="100px" height="60px" src="<?=base_url()?><?=$slide->slide_image_thumb?>" /></td>
                                    <td><?=$slide->slide_des?></td>
                                    <td><?=$slide->slide_created?></td>
                                    <td><?=$slide->slide_link?></td>
                                    <?php if($slide->slide_status == 1):?>
                                        <td>Hiển thị</td>
                                    <?php else:?>
                                        <td>Ẩn</td>
                                    <?php endif;?>
                                    <td><?=$slide->slide_order?></td>

                                    <td>
                                        <a href="<?=base_url()?>backend/slide/editslide/<?=$slide->slide_id?>" class="edit">
                                            <img src="<?=base_url()?>assets/backend/css/images/edit.png"/>
                                        </a>
                                    </td>
                                    <td>
                                        <a href="<?=base_url()?>backend/slide/delslide/<?=$slide->slide_id?>" class="delete">
                                            <img src="<?=base_url()?>assets/backend/css/images/delete.png"/>
                                        </a>
                                    </td>
                                    </tr>
                                <?php endforeach;?>
                            <?php endif;?>
                        <?php endif;?>
                    </tbody>
                </table>